package com.lnking.lnkingplace.mapper;

import com.lnking.lnkingplace.model.dto.isolation.place.PlaceReserveDto;
import com.lnking.lnkingplace.model.dto.isolation.statistics.IsolationPlaceDto;
import com.lnking.lnkingplace.model.dto.isolation.statistics.IsolationPlaceStatisticsCount;
import com.lnking.lnkingplace.model.dto.isolation.statistics.PlaceStatisticsPersonnelType;
import com.lnking.lnkingplace.model.request.isolation.statistics.StatisticsSearchPersonnelType;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface IsolationPlaceStatisticsMapper {

    /**
     * 所有隔离人员
     * @return
     */
    Integer getPersonCount(String date);

    /**
     * 隔离场所总数
     * @return
     */
    Integer getPlaceCount();

    /**
     * 根据状态查询隔离房间数量
     * @return
     */
    Integer getRoomCount(String useStatus,String street);

    /**
     * 根据条件查询隔离场所专班人员
     * @return
     */
    Integer getWorkerCount(@Param("camp") String camp,
                           @Param("placeName") String placeName,
                           @Param("street") String street);

    /**
     * 根据条件查询关心台账数量
     * @param status
     * @return
     */
    Integer getAssistanceCount(String status,String street);

    /**
     * 按类型查找关心台账数量
     * @return
     */
    List<IsolationPlaceStatisticsCount> getIsolationAssistanceType(String street);

    /**
     * 查询问题整改台账数量
     * @return
     */
    Integer getPlaceProblem(@Param("result") String result,
                            @Param("newProblem") String newProblem,
                            @Param("todayDeal") String todayDeal,
                            @Param("street") String street);

    /**
     * 历史数据
     * @return
     */
    Integer getHistoryData(@Param("year") String year,
                           @Param("date") String date,
                           @Param("street") String street);

    /**
     * 隔离人员按类型环形图
     * @return
     */
    List<IsolationPlaceStatisticsCount> getPersonnelPieChart(String today,String street);

    Integer getPositive(String date,String street);

    Integer getAfterPositive(@Param("year") String year,@Param("date") String date,@Param("street") String street);

    List<IsolationPlaceStatisticsCount> getPositivePieChart(String street);

    List<IsolationPlaceStatisticsCount> getAfterPositivePieChart(String street);

    List<IsolationPlaceStatisticsCount> getIsolationWorkerPieChart(@Param("placeId") String placeId,
                                                                   @Param("camp") String camp,
                                                                   @Param("street") String street);

    List<IsolationPlaceStatisticsCount> getSupportOccupancyTotal(@Param("placeName") String placeName,
                                                                 @Param("street") String street);

    List<IsolationPlaceStatisticsCount> getSupportOccupancyNumber(@Param("placeName") String placeName,
                                                                  @Param("street") String street);

    List<IsolationPlaceStatisticsCount> getSupportDayNewNumber(@Param("placeName") String placeName,
                                                               @Param("street") String street);

    List<IsolationPlaceStatisticsCount> getSupportUseRoom(@Param("placeName") String placeName,
                                                          @Param("street") String street);

    Integer getMedicalPlace(String street);

    Integer getMedicalRoomNumber(String street);

    Integer getMedicalUseRoom(String street);

    Integer getSupportPlace(String street);

    Integer getSupportUseRoomNumber(String street);

    Integer getHistoryPositiveData(@Param("year") String year,
                                   @Param("date") String date,
                                   @Param("street") String street);

    List<PlaceReserveDto> getIsolationPlaceReserve(String street);

    PlaceReserveDto getPlaceReserve(String placeType,String street);

    Integer getPersonnelTotal(String personnelType,String street,String date);

    Integer getUseRoom(String street,String date);

    Integer getRelieveToday(String street);

    Integer getRelieveTomorrow(String street);

    Integer getHistoryEqData(String year,String street);

    Integer getHistoryEqPositiveData(String year, String street);

    Integer getAfterPositiveEq(String year, String street);

    List<PlaceStatisticsPersonnelType> getPersonnelType(StatisticsSearchPersonnelType params);

    List<IsolationPlaceStatisticsCount> getPersonnel(String placeId);

    List<IsolationPlaceStatisticsCount> getRoom(String placeId);

    IsolationPlaceDto getThreshold(String placeId);

    List<String> getDate();
}
